Crate femtovg[−][src]
The femtovg API is (like NanoVG) loosely modeled on the HTML5 Canvas API.
The coordinate system’s origin is the top-left corner, with positive X rightwards, positive Y downwards.
Re-exports
pub use renderer::RenderTarget; | |
pub use renderer::Renderer; |
Modules
renderer | Module containing renderer implementations. |
Structs
Canvas | Main 2D drawing context. |
Color | Struct for representing colors. |
CompositeOperationState | Determines how a new (“source”) data is displayed against an existing (“destination”) data. |
FontId | A font handle. |
FontMetrics | Information about a font. |
ImageFlags | Image flags (eg. repeat, flip, mipmaps, etc.) |
ImageId | An image handle. |
ImageInfo | Information about an image. |
Paint | Struct controlling how graphical shapes are rendered. |
Path | A collection of verbs ( |
TextMetrics | Result of a shaping run. |
Transform2D | 2×3 matrix (2 rows, 3 columns) used for 2D linear transformations. It can represent transformations such as translation, rotation, or scaling. |
Enums
Align | Text horizontal alignment: |
Baseline | Text baseline vertical alignment:
|
BlendFactor | Blend factors. |
CompositeOperation | Predefined composite oprations. |
ErrorKind | Enum with all possible canvas errors that could occur. |
FillRule | The fill rule used when filling paths: |
ImageSource | Image source |
LineCap | Determines the shape used to draw the end points of lines:
|
LineJoin | Determines the shape used to join two line segments where they meet.
|
PixelFormat | Image format: |
Solidity | Used to specify Solid/Hole when adding shapes to a path. |